import HttpRequest from '@/libs/axios'
// const baseUrl = process.env.NODE_ENV === 'development' ? '/apiTest1' : 'http://gd.cdmjwater.com:8000/process-web'
const baseUrl = config.baseUrl.VUE_ORDER_URL + '/process-web'

// 代办
export const processList = ({ taskInfo, pageNum, pageSize }) => {
  return new HttpRequest(baseUrl).request({
    url: '/process/list',
    method: 'get',
    params: { taskInfo, pageNum, pageSize }
  })
}

// 已办
export const processHisProcessList = ({ taskInfo, pageNum, pageSize }) => {
  return new HttpRequest(baseUrl).request({
    url: '/process/hisProcessList',
    method: 'get',
    params: { taskInfo, pageNum, pageSize }
  })
}

// 所有已办任务
export const getAllHisTaskList = ({ taskInfo, pageNum, pageSize }) => {
  return new HttpRequest(baseUrl).request({
    url: '/process/getAllHisTaskList',
    method: 'get',
    params: { taskInfo, pageNum, pageSize }
  })
}

// 所有待办任务
export const getAllTaskList = ({ taskInfo, pageNum, pageSize }) => {
  return new HttpRequest(baseUrl).request({
    url: '/process/getAllTaskList',
    method: 'get',
    params: { taskInfo, pageNum, pageSize }
  })
}

// 流程日志
export const getProcessComment = (processInstanceId) => {
  return new HttpRequest(baseUrl).request({
    url: '/process/getCROSProcessComment',
    method: 'get',
    params: { processInstanceId }
  })
}
